// instructions 处理http请求相关的中间件

import { Next } from 'koa';
import type {
  KoaContext,
} from '@/types/koa';

export const transformQueryToBody = async (ctx: KoaContext, next: Next) => {
  ctx.request.body = Object.assign(ctx.request.body, ctx.request.query);
  await next();
};
